package com.sc.nft.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.BuyFirstUser;
import com.sc.nft.entity.vo.AddBuyFirstUserExcelVO;
import com.sc.nft.entity.vo.BuyFirstUserListVO;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 服务接口
 *
 * @author rdg
 * @since 2022-08-03 15:15:20
 * @description 由 Mybatisplus Code Generator 创建
 */
public interface BuyFirstUserService {
    /**
    * @description: 查询优先购商品关联的白名单
    * @author: rdg
    * @date: 2022/8/4 10:28
    * @param: [id]
    * @return: java.util.List<com.sc.nft.entity.vo.BuyFirstUserListVO>
    **/
    Page<BuyFirstUserListVO> buyFirstUserList(Long productId, String userTel, int pageNo, int pageSize);

    /**
    * @description: 根据商品id用户id查询用户是否在白名单中
    * @author: rdg
    * @date: 2022/8/4 17:46
    * @param: [productId, userId]
    * @return: java.util.List<com.sc.nft.entity.BuyFirstUser>
    **/
    BuyFirstUser selectByProductIdAndUserId(Long productId, Long userId);

    /**
    * @description: 解析批量白名单excel
    * @author: rdg
    * @date: 2022/8/4 17:46
    * @param: [productId, uploadFile]
    * @return: java.util.List<com.sc.nft.entity.vo.AddBuyFirstUserExcelVO>
    **/
    List<AddBuyFirstUserExcelVO> addBuyFirstUserExcel(Long productId, MultipartFile uploadFile)throws IOException;

}
